package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.ReportDetailActivity;
import com.wwtech.epp.ui.activity.work.contract.ReportDetailContract;
import com.wwtech.epp.ui.activity.work.presenter.ReportDetailPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of ReportDetailActivity, provide field for ReportDetailActivity
 * @date 2017/10/19 23:02:48
 */
@Module
public class ReportDetailModule {
    private final ReportDetailContract.View mView;


    public ReportDetailModule(ReportDetailContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public ReportDetailPresenter provideReportDetailPresenter(HttpAPIWrapper httpAPIWrapper, ReportDetailActivity mActivity) {
        return new ReportDetailPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public ReportDetailActivity provideReportDetailActivity() {
        return (ReportDetailActivity) mView;
    }
}